<template>
    <div class="container" ref="container">
        
  <!-- <div ref="chart" style="height: 21vh; width: 100%"></div> -->
        <div class="content">
            <div class="holiday-management">
                <span style="display: flex;width: 100%;">
                    <router-link class="back-link" to="/main/renshi">返回</router-link>
                </span>
                <h2 class="section-title">
                    <span class="highlight">假期管理</span>
                </h2>
                <div class="link-list">
                    <div class="link-item">
                        <router-link class="link" to="/main/renshi/jiaqiguanli/jiaqiglgd/jiaqiglgd">假期管理规定</router-link>
                    </div>
                    <div class="link-item">
                        <router-link class="link"
                            to="/main/renshi/jiaqiguanli/qjhejueqxb/qjhejueqxb">请假核决权限表</router-link>
                    </div>
                    <div class="link-item">
                        <router-link class="link"
                            to="/main/renshi/jiaqiguanli/nianjiaglgd/nianjiaglgd">年假管理规定</router-link>
                    </div>
                    <div class="link-item">
                        <router-link class="link" to="/main/renshi/kaoqing/qingjia">请假单</router-link>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<!-- <script>
export default {
  mounted() {
    this.checkScrollbar();
    window.addEventListener('resize', this.checkScrollbar);
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.checkScrollbar);
  },
  methods: {
    checkScrollbar() {
      const div = this.$refs.chart;
      const div2 = this.$refs.container;
      if (document.body.scrollHeight > window.innerHeight) {
        div.style.display = 'none';
        //div2加一个样式justify-content: center;
        div2.style.justifyContent = 'center';
        
      } else {
        div.style.display = 'block';        
        //div2取消一个样式justify-content: center;
        div2.style.justifyContent = '';
      }
    }
  }
}
</script> -->
<style scoped>
/* 全局样式 */
* {
    font-family: '宋体', serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 容器样式 */
.container {
    /* background-color: #f5f8fa; */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* 返回链接样式 */
.back-link {
    position: relative;
    /* top: 10px; */
    /* left: 10px; */
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 假期管理容器样式 */
.holiday-management {
    background-color: #fff;
    width: 800px;
    height: 494.4px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
}

/* 标题样式 */
.section-title {
    margin-top: 30px;
    font-size: 1.2em;
}

.highlight {
    font-weight: bold;
    background-color: #409eff;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 链接列表样式 */
.link-list {
    width: 100%;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 链接项样式 */
.link-item {
    width: 80%;
    margin-bottom: 20px;
}

.link {
    display: block;
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.link:hover {
    background-color: #e8f4ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #409eff;
}
</style>